﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace SmartBot
{
    /// <summary>
    /// This class contains EVERYTHING that includes username, password, all auto accounts, etc.
    /// </summary>
    public partial class SmartClass
    {
        /// <summary>
        /// Background thread used to read information of all targets. From this thread, will delegate more background tasks to read.
        /// </summary>
        public Thread ReadInfoThread;

        /// <summary>
        /// TRUE if the frmMain opened. FALSE if it's not
        /// </summary>
        public bool UIAvailable = false;

        /// <summary>
        /// What is the target process executable name?
        /// </summary>
        private string TargetProcessName = "Game-multiacc";
        /// <summary>
        /// DLL path
        /// </summary>
        private string DllPath = AppDomain.CurrentDomain.BaseDirectory + @"tinydll.dll";

        /// <summary>
        /// Chứa các setting chung cho toàn app.
        /// </summary>
        public GlobalSettings GlobalSetting = new GlobalSettings();

        /// <summary>
        /// Contain all auto accounts information
        /// </summary>
        public List<AutoAccount> AllAutoAccounts = new List<AutoAccount>();

        /// <summary>
        /// Chứa base addresses cho tất cả các auto. Danh sách này được lấy xuống từ server sau khi login thành công.
        /// </summary>
        public Dictionary<string, string> BaseAddresses = new Dictionary<string, string>();

        /// <summary>
        /// Constructor for the main class
        /// </summary>
        public SmartClass()
        {
            //frmMain.frmMainInstance.txtToaDo.Text = "Hello world";

            //Initiate background thread
            ReadInfoThread = new Thread(new ThreadStart(ReadAllMemory));
            ReadInfoThread.IsBackground = true;
            ReadInfoThread.Start();

        }








    }
}
